import request from '@/utils/request'

let DiscountApi = {
  /*活动列表*/
  activeList(data, errorback) {
    return request._post('/supplier/activity.discount/index', data, errorback);
  },
  getProduct(data, errorback){
     return request._get('/supplier/activity.discount/add', data, errorback);
  },
  addProduct(data, errorback){
     return request._post('/supplier/activity.discount/add', data, errorback);
  },
  /*我的活动列表*/
  myList(data, errorback) {
    return request._post('/supplier/activity.discount/my', data, errorback);
  },
  /*根据主键查询*/
  detailProduct(data, errorback){
     return request._get('/supplier/activity.discount/edit', data, errorback);
  },
  /*根据主键查询*/
  saveProduct(data, errorback){
     return request._post('/supplier/activity.discount/edit', data, errorback);
  },
  delProduct(data, errorback){
     return request._post('/supplier/activity.discount/del', data, errorback);
  },

  addActive(data, errorback) {
    return request._post('/supplier/activity.discount/addActive', data, errorback);
  },
  /*获取秒杀活动数据*/
  getActive(data, errorback) {
    return request._get('/supplier/activity.discount/editActive', data, errorback);
  },
  /*保存秒杀活动*/
  saveActive(data, errorback) {
    return request._post('/supplier/activity.discount/editActive', data, errorback);
  },
  /*删除秒杀活动*/
  delActive(data, errorback) {
    return request._post('/supplier/activity.discount/deleteActive', data, errorback);
  },
}
export default DiscountApi;
